package com.massteam.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Repository;

import com.massteam.dao.BaseDAO;
import com.massteam.pojo.InformationComments;
import com.massteam.service.InformationCommentsService;

/**
 * @author 作者liuchengwei E-mail:liuchengwei98@163.com
 * @version 0.1
 * @since 创建时间：2012-1-6 下午04:48:19
 */
@Repository
public class InformationCommentsServiceImpl implements InformationCommentsService{
	@Autowired
	@Qualifier("baseDao")
	BaseDAO baseDao;

	public void addInformationComments(InformationComments informationComments) {
		baseDao.saveOrUpdate(informationComments);
	}

	public void delInformationComments(String id) {
		baseDao.delById(InformationComments.class, id);
	}

	@SuppressWarnings("unchecked")
	public List<InformationComments> queryInformationComments(String hql) {
		return ( List<InformationComments>) baseDao.query(hql);
	}

	public void updateInformationComments(String hql) {
		baseDao.update(hql);
	}

	public InformationComments findInformationCommentsById(String id) {
		return (InformationComments) baseDao.loadById(InformationComments.class, id);
	}

}
